<template>
	<view class="projectitem" @click="to('/pages/project/details?id='+item.id+'&cardid='+cardid+'&cardnum='+cardnum)">
		<view class="projectitem__cf">
			{{item.pod}}出发
		</view>
		<image :src="URL(item.image)" class="projectitem__pic" mode="aspectFill"></image>
		<view class="projectitem__info">
			<view class="projectitem__a">
				{{item.title}}
			</view>
			<view class="projectitem__b tn-text-ellipsis-2">
				{{item.intro}}
			</view>
			<view class="projectitem__c">
				{{item.tags}}
			</view>
			<view class="tn-flex tn-flex-col-center tn-flex-row-between">
				<view class="projectitem__price">
					<text class="unit">￥</text> {{item.price}} <text class="qi">起</text>
				</view>
				<view class="projectitem__bm">
					{{item.people}}人已报名
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "project-item",
		props: {
			item: {
				type: Object,
				default: {

				}
			},
			cardid: {
				type: Number,
				default: 0
			},
			cardnum: {
				type: String,
				default: ''
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	.projectitem {
		width: 344rpx;
		background: #FFFFFF;
		border-radius: 30rpx;
		overflow: hidden;
		position: relative;
		margin-bottom: 28rpx;

		&__pic {
			width: 344rpx;
			height: 248rpx;

		}

		&__cf {
			padding: 0 12rpx;
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 22rpx;
			color: #FFFCFD;
			line-height: 40rpx;
			background: rgba(49, 49, 49, .5);
			border-radius: 20rpx 0rpx 20rpx 0rpx;
			position: absolute;
			left: 0;
			top: 0;
			z-index: 1;
		}

		&__info {
			width: 344rpx;
			// height: 248rpx;
			background: #FFFFFF;
			// border-radius: 0rpx 0rpx 30rpx 30rpx;
			padding: 26rpx 20rpx;
		}

		&__a {
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 22rpx;
			color: #000000;
			line-height: 22rpx;
			margin-bottom: 24rpx;
		}

		&__b {
			font-family: PingFang SC;
			font-weight: 800;
			font-size: 28rpx;
			color: #000000;
			line-height: 36rpx;
			margin-bottom: 4rpx;
			width: 90%;
		}

		&__c {
			background: #F8F8F8;
			border-radius: 10rpx;
			padding: 12rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 20rpx;
			color: #666666;
			line-height: 20rpx;
			width: fit-content;
			margin-bottom: 8rpx;
		}

		&__price {
			font-family: DINNextLTPro-Bold;
			font-weight: bold;
			font-size: 31rpx;
			color: #FD3C33;
			line-height: 23rpx;
			padding-left: 14rpx;
		}

		&__bm {
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 21rpx;
			color: #606060;
			line-height: 21rpx;
		}
	}

	.qi {
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 20rpx;
		color: #979797;
		line-height: 20rpx;
		margin-left: 8rpx;
	}

	.unit {
		font-family: PingFang SC;
		font-weight: bold;
		font-size: 23rpx;
		color: #FD3C33;
		line-height: 23rpx;
	}
</style>